<!-- @format -->

<template>
  <section class="ling-top-text improvement_personal">
    <h2>接单人资料</h2>
    <div class="improvement_personal_detail" v-if="userDetail">
      <div class="improvement_personal_items">
        <div class="label">姓名</div>
        <div class="value">{{ userDetail.name }}</div>
      </div>

      <div class="improvement_personal_items">
        <div class="label">手机号</div>
        <div class="value">{{ userDetail.mobile }}</div>
      </div>

      <div class="improvement_personal_items">
        <div class="label">手机号</div>
        <div class="value">{{ userDetail.idNumber }}</div>
      </div>

      <div class="improvement_personal_items">
        <div class="label">邮箱</div>
        <div class="value">{{ userDetail.emailAddress }}</div>
      </div>

      <div class="improvement_personal_items">
        <div class="label">最高学历</div>
        <div class="certificate" :style="{ backgroundImage: `url(${userDetail.qualifications})` }"></div>
      </div>

      <div class="improvement_personal_items">
        <div class="label" style="width: 100%; margin-bottom: 15px">技能证书</div>
        <div
          v-for="item in userDetail.skillsCertificateList"
          :key="item.id"
          class="certificate"
          :style="{ backgroundImage: `url(${item})` }"
          @click="showBigImg(item)"
        >
          <wimg
            :show="isShowBigImg"
            :imgs="userDetail.skillsCertificateList"
            :currentImg="current"
            @close="isShowBigImg = false"
          ></wimg>
        </div>
      </div>
    </div>
  </section>
</template>

<script>
import wimg from 'w-previewimg'
import { uploadToQiniu } from '@/utils/qiniuUpload'
import { createNamespacedHelpers } from 'vuex'
const { mapState, mapActions } = createNamespacedHelpers('myData')
export default {
  name: 'improvementPersonalPage',
  data() {
    return {
      isShowBigImg: false,
      current: '',
      userDetail: JSON.parse(this.$route.query.userDetail),
    }
  },
  components: { wimg },
  created() {},
  methods: {
    showBigImg(i) {
      this.current = i
      this.isShowBigImg = true
    },
  },
}
</script>

<style lang="less" scoped>
.improvement_personal {
  position: relative;
  .improvement_personal_detail {
    padding-left: 20px;
    position: relative;

    .improvement_personal_items {
      border-bottom: solid 1px #dddddd;
      margin-top: 18px;
      padding-bottom: 10px;
      position: relative;
      font-size: 15px;
      color: #646566;
      display: flex;
      flex-wrap: wrap;
      .label {
        width: 115px;
        padding: 0 16px;
      }
      .value {
      }
      .certificate {
        width: 105px;
        height: 60px;
        overflow: hidden;
        margin-right: 10px;
        margin-bottom: 10px;
        display: inline-block;
        background-size: cover;
        background-position: center center;
      }
    }
  }
}
</style>
